package com.eamois.action.graph;

import java.util.Collection;

import com.eamois.action.BaseAction;
import com.eamois.domain.graph.GraphPolygon;
import com.eamois.domain.graph.GraphTemplate;
import com.eamois.service.graph.GraphPolygonService;
import com.eamois.util.ServiceFactory;

public class GraphPolygonAction extends BaseAction {
	private GraphPolygonService graphPolygonService;

	public GraphPolygonService getGraphPolygonService() {
		return graphPolygonService;
	}

	public void setGraphPolygonService(GraphPolygonService graphPolygonService) {
		this.graphPolygonService = graphPolygonService;
	}

	public GraphPolygonAction() {
		setGraphPolygonService((GraphPolygonService) ServiceFactory.getInstance()
				.getBean("graphPolygonService"));
	}
	
	public Collection<GraphPolygon> findGraphPolygonByTemplate(GraphTemplate graphTemplate) {
		return this.getGraphPolygonService().findGraphPolygonByTemplate(graphTemplate);
	}

	public void saveGraphPolygon(GraphPolygon graphPolygon) {
		getGraphPolygonService().save(graphPolygon);
	}

	public void removeGraphLine(GraphPolygon graphPolygon) {
		getGraphPolygonService().remove(graphPolygon);
	}


}
